package com.ruoyi.thirdpartyaccounts.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.thirdpartyaccounts.mapper.ThirdpartyaccountsMapper;
import com.ruoyi.thirdpartyaccounts.domain.Thirdpartyaccounts;
import com.ruoyi.thirdpartyaccounts.service.IThirdpartyaccountsService;

/**
 * 第三方账号Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-28
 */
@Service
public class ThirdpartyaccountsServiceImpl implements IThirdpartyaccountsService 
{
    @Autowired
    private ThirdpartyaccountsMapper thirdpartyaccountsMapper;

    /**
     * 查询第三方账号
     * 
     * @param thirdPartyId 第三方账号主键
     * @return 第三方账号
     */
    @Override
    public Thirdpartyaccounts selectThirdpartyaccountsByThirdPartyId(Long thirdPartyId)
    {
        return thirdpartyaccountsMapper.selectThirdpartyaccountsByThirdPartyId(thirdPartyId);
    }

    /**
     * 查询第三方账号列表
     * 
     * @param thirdpartyaccounts 第三方账号
     * @return 第三方账号
     */
    @Override
    public List<Thirdpartyaccounts> selectThirdpartyaccountsList(Thirdpartyaccounts thirdpartyaccounts)
    {
        return thirdpartyaccountsMapper.selectThirdpartyaccountsList(thirdpartyaccounts);
    }

    /**
     * 新增第三方账号
     * 
     * @param thirdpartyaccounts 第三方账号
     * @return 结果
     */
    @Override
    public int insertThirdpartyaccounts(Thirdpartyaccounts thirdpartyaccounts)
    {
        return thirdpartyaccountsMapper.insertThirdpartyaccounts(thirdpartyaccounts);
    }

    /**
     * 修改第三方账号
     * 
     * @param thirdpartyaccounts 第三方账号
     * @return 结果
     */
    @Override
    public int updateThirdpartyaccounts(Thirdpartyaccounts thirdpartyaccounts)
    {
        return thirdpartyaccountsMapper.updateThirdpartyaccounts(thirdpartyaccounts);
    }

    /**
     * 批量删除第三方账号
     * 
     * @param thirdPartyIds 需要删除的第三方账号主键
     * @return 结果
     */
    @Override
    public int deleteThirdpartyaccountsByThirdPartyIds(Long[] thirdPartyIds)
    {
        return thirdpartyaccountsMapper.deleteThirdpartyaccountsByThirdPartyIds(thirdPartyIds);
    }

    /**
     * 删除第三方账号信息
     * 
     * @param thirdPartyId 第三方账号主键
     * @return 结果
     */
    @Override
    public int deleteThirdpartyaccountsByThirdPartyId(Long thirdPartyId)
    {
        return thirdpartyaccountsMapper.deleteThirdpartyaccountsByThirdPartyId(thirdPartyId);
    }
}
